Skip to content

Fix C++17 build of WeakPartialOrderingTest - #32

Closed
arthaud wants to merge 1 commit into
meta:mainfrom
arthaud:fix-cxx17-weak-partial-ordering-test
Closed

arthaud wants to merge 1 commit into
meta:mainfrom
arthaud:fix-cxx17-weak-partial-ordering-test

Conversation

@arthaud

@arthaud arthaud commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

std::to_array is only available from C++20 onwards, but the project pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the test failed to compile:

error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test match the standard the rest of the project targets rather than raising it. lst is only ever read through lst[i++], so a std::vector initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused include and add , which the file already relied on transitively.

`std::to_array` is only available from C++20 onwards, but the project
pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the
test failed to compile:

    error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test
match the standard the rest of the project targets rather than raising
it. `lst` is only ever read through `lst[i++]`, so a `std::vector`
initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused <array> include and add <vector>, which the file
already relied on transitively.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DA9pVcgt8MxaeGJUaYfh5H
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 6, 2026
@meta-codesync

meta-codesync Bot commented Sep 7, 2026

Copy link
Copy Markdown

@arthaud has imported this pull request. If you are a Meta employee, you can view this in D119057645.

@meta-codesync meta-codesync Bot closed this in 076e40f Sep 8, 2026
@meta-codesync

meta-codesync Bot commented Sep 8, 2026

Copy link
Copy Markdown

@arthaud merged this pull request in 076e40f.

@meta-codesync meta-codesync Bot added the Merged label Sep 8, 2026
meta-codesync Bot pushed a commit to meta/redex that referenced this pull request Sep 8, 2026
Summary:
`std::to_array` is only available from C++20 onwards, but the project pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the test failed to compile:

    error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test match the standard the rest of the project targets rather than raising it. `lst` is only ever read through `lst[i++]`, so a `std::vector` initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused <array> include and add <vector>, which the file already relied on transitively.

X-link: meta/SPARTA#32

Reviewed By: arnaudvenet

Differential Revision: D119057645

Pulled By: arthaud

fbshipit-source-id: f43523a8444ccff60c5123e4b3ad5774b13c8f00
meta-codesync Bot pushed a commit to meta/redex that referenced this pull request Sep 8, 2026
Summary:
`std::to_array` is only available from C++20 onwards, but the project pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the test failed to compile:

    error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test match the standard the rest of the project targets rather than raising it. `lst` is only ever read through `lst[i++]`, so a `std::vector` initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused <array> include and add <vector>, which the file already relied on transitively.

X-link: meta/SPARTA#32

Reviewed By: arnaudvenet

Differential Revision: D119057645

Pulled By: arthaud

fbshipit-source-id: f43523a8444ccff60c5123e4b3ad5774b13c8f00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant